<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>数据管理-{$site.SITE_INFO.name}</title>
        <php>
            $addCss="";
            $addJs="";
            $currentNav ='数据管理 > 数据库表信息';
        </php>
        <include file="Common:intoHead" />
    </head>
    <body>
        <div class="wrap">
            <include file="Common:head" />
            <div class="mainBody">
                <include file="Common:left" />
                <div id="Right">
                    <div class="Item hr">
                        <span class="fr">数据库中共有{$tables}张表，共计{$total}</span>
                        <div class="current">数据库表结构列表</div>
                    </div>
                    <form>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab">
                            <thead>
                                <tr>
                                    <td width="90"><label><input name="" class="chooseAll" type="checkbox"/> 全选</label> <label><input name="" class="unsetAll" type="checkbox"/> 反选</label></td>
                                    <td>表名</td>
                                    <td>表用途</td>
                                    <td>记录行数</td>
                                    <td>引擎类型</td>
                                    <td>字符集</td>
                                    <td>表大小</td>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="list" id="tab">
                                    <tr align="center">
                                        <td><input type="checkbox" name="table[]" value="{$tab.Name}"/></td>
                                        <td align="left">{$tab.Name}</td>
                                        <td>{$tab.Comment}</td>
                                        <td>{$tab.Rows}</td>
                                        <td>{$tab.Engine}</td>
                                        <td>{$tab.Collation}</td>
                                        <td>{$tab.size}</td>
                                    </tr>
                                </volist>
                            </tbody>
                            <tfoot align="center">
                                <tr>
                                    <td width="90"><label><input name="" class="chooseAll" type="checkbox"/> 全选</label> <label><input name="" class="unsetAll" type="checkbox"/> 反选</label></td>
                                    <td>表名</td>
                                    <td>表用途</td>
                                    <td>记录行数</td>
                                    <td>引擎类型</td>
                                    <td>字符集</td>
                                    <td>总计：{$total}</td>
                                </tr>
                            </tfoot>
                        </table>
                    </form>
                    <div class="commonBtnArea" >
                        <button class="btn submit">备份所选</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
        <include file="Common:foot" />
        <script type="text/javascript">
            $(function(){
                clickCheckbox();
                $(".submit").click(function(){
                    if($("tbody input[type='checkbox']:checked").size()==0){
                        popup.alert("请先选择你要备份的数据库表吧");
                        return false;
                    }
                    if($(this).attr("disabledSubmit")){
                        popup.alert("已提交，系统在处理中...");
                    }else{
                        $(this).attr("disabledSubmit",true).html("提交处理中...");
                        commonAjaxSubmit("__URL__/backup");
//                        popup.alert("系统处理中，如果数据库中数据较多可能需要较长时间，请稍候....");
                        setTimeout(function(){
                            popup.close("asyncbox_alert");
                        },2000);
                    }
                });
            });
        </script>
    </body>
</html>
